3.6.62 \(\int \frac {A+B x^2}{x^2 \sqrt {a+b x^2}} \, dx\) [562]

Optimal. Leaf size=47 \[ -\frac {A \sqrt {a+b x^2}}{a x}+\frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}} \]

[Out]

B*arctanh(x*b^(1/2)/(b*x^2+a)^(1/2))/b^(1/2)-A*(b*x^2+a)^(1/2)/a/x

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {462, 223, 212} \begin {gather*} \frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}-\frac {A \sqrt {a+b x^2}}{a x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x^2)/(x^2*Sqrt[a + b*x^2]),x]

[Out]

-((A*Sqrt[a + b*x^2])/(a*x)) + (B*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/Sqrt[b]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 462

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[c*(e*x)^(m +
 1)*((a + b*x^n)^(p + 1)/(a*e*(m + 1))), x] + Dist[d/e^n, Int[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a,
 b, c, d, e, m, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n*(p + 1) + 1, 0] && (IntegerQ[n] || GtQ[e, 0]) && (
(GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1]))

Rubi steps

\begin {align*} \int \frac {A+B x^2}{x^2 \sqrt {a+b x^2}} \, dx &=-\frac {A \sqrt {a+b x^2}}{a x}+B \int \frac {1}{\sqrt {a+b x^2}} \, dx\\ &=-\frac {A \sqrt {a+b x^2}}{a x}+B \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {x}{\sqrt {a+b x^2}}\right )\\ &=-\frac {A \sqrt {a+b x^2}}{a x}+\frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 50, normalized size = 1.06 \begin {gather*} -\frac {A \sqrt {a+b x^2}}{a x}-\frac {B \log \left (-\sqrt {b} x+\sqrt {a+b x^2}\right )}{\sqrt {b}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x^2)/(x^2*Sqrt[a + b*x^2]),x]

[Out]

-((A*Sqrt[a + b*x^2])/(a*x)) - (B*Log[-(Sqrt[b]*x) + Sqrt[a + b*x^2]])/Sqrt[b]

________________________________________________________________________________________

Maple [A]
time = 0.08, size = 41, normalized size = 0.87

method result size
default \(\frac {B \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right )}{\sqrt {b}}-\frac {A \sqrt {b \,x^{2}+a}}{a x}\) \(41\)
risch \(\frac {B \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right )}{\sqrt {b}}-\frac {A \sqrt {b \,x^{2}+a}}{a x}\) \(41\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x^2+A)/x^2/(b*x^2+a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

B*ln(x*b^(1/2)+(b*x^2+a)^(1/2))/b^(1/2)-A*(b*x^2+a)^(1/2)/a/x

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 33, normalized size = 0.70 \begin {gather*} \frac {B \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {b}} - \frac {\sqrt {b x^{2} + a} A}{a x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/x^2/(b*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

B*arcsinh(b*x/sqrt(a*b))/sqrt(b) - sqrt(b*x^2 + a)*A/(a*x)

________________________________________________________________________________________

Fricas [A]
time = 1.58, size = 109, normalized size = 2.32 \begin {gather*} \left [\frac {B a \sqrt {b} x \log \left (-2 \, b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right ) - 2 \, \sqrt {b x^{2} + a} A b}{2 \, a b x}, -\frac {B a \sqrt {-b} x \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) + \sqrt {b x^{2} + a} A b}{a b x}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/x^2/(b*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

[1/2*(B*a*sqrt(b)*x*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) - 2*sqrt(b*x^2 + a)*A*b)/(a*b*x), -(B*a*sq
rt(-b)*x*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) + sqrt(b*x^2 + a)*A*b)/(a*b*x)]

________________________________________________________________________________________

Sympy [A]
time = 0.76, size = 99, normalized size = 2.11 \begin {gather*} - \frac {A \sqrt {b} \sqrt {\frac {a}{b x^{2}} + 1}}{a} + B \left (\begin {cases} \frac {\sqrt {- \frac {a}{b}} \operatorname {asin}{\left (x \sqrt {- \frac {b}{a}} \right )}}{\sqrt {a}} & \text {for}\: a > 0 \wedge b < 0 \\\frac {\sqrt {\frac {a}{b}} \operatorname {asinh}{\left (x \sqrt {\frac {b}{a}} \right )}}{\sqrt {a}} & \text {for}\: a > 0 \wedge b > 0 \\\frac {\sqrt {- \frac {a}{b}} \operatorname {acosh}{\left (x \sqrt {- \frac {b}{a}} \right )}}{\sqrt {- a}} & \text {for}\: b > 0 \wedge a < 0 \end {cases}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x**2+A)/x**2/(b*x**2+a)**(1/2),x)

[Out]

-A*sqrt(b)*sqrt(a/(b*x**2) + 1)/a + B*Piecewise((sqrt(-a/b)*asin(x*sqrt(-b/a))/sqrt(a), (a > 0) & (b < 0)), (s
qrt(a/b)*asinh(x*sqrt(b/a))/sqrt(a), (a > 0) & (b > 0)), (sqrt(-a/b)*acosh(x*sqrt(-b/a))/sqrt(-a), (b > 0) & (
a < 0)))

________________________________________________________________________________________

Giac [A]
time = 0.93, size = 58, normalized size = 1.23 \begin {gather*} -\frac {B \log \left ({\left (\sqrt {b} x - \sqrt {b x^{2} + a}\right )}^{2}\right )}{2 \, \sqrt {b}} + \frac {2 \, A \sqrt {b}}{{\left (\sqrt {b} x - \sqrt {b x^{2} + a}\right )}^{2} - a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/x^2/(b*x^2+a)^(1/2),x, algorithm="giac")

[Out]

-1/2*B*log((sqrt(b)*x - sqrt(b*x^2 + a))^2)/sqrt(b) + 2*A*sqrt(b)/((sqrt(b)*x - sqrt(b*x^2 + a))^2 - a)

________________________________________________________________________________________

Mupad [B]
time = 0.36, size = 40, normalized size = 0.85 \begin {gather*} \frac {B\,\ln \left (\sqrt {b}\,x+\sqrt {b\,x^2+a}\right )}{\sqrt {b}}-\frac {A\,\sqrt {b\,x^2+a}}{a\,x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x^2)/(x^2*(a + b*x^2)^(1/2)),x)

[Out]

(B*log(b^(1/2)*x + (a + b*x^2)^(1/2)))/b^(1/2) - (A*(a + b*x^2)^(1/2))/(a*x)

________________________________________________________________________________________